#ifndef THERMAL_JACOBIAN_MATRIX_H
#define THERMAL_JACOBIAN_MATRIX_H

#include BS_FORCE_PLUGIN_IMPORT ()
#include "jacobian_matrix.h"
#include "linear_solvers.h"
#include "cgs.h"
#include BS_STOP_PLUGIN_IMPORT ()

namespace blue_sky{

	template <class strategy_t>
	class BS_API_PLUGIN thermal_jacobian_matrix : public jacobian_matrix<strategy_t> {

		typedef thermal_jacobian_matrix<strategy_t> this_t;
		typedef jacobian_matrix<strategy_t> base_t;

		typedef linear_solver_base <strategy_t>                   linear_solver_base_t;
		typedef smart_ptr<linear_solver_base_t, true>             sp_linear_solver_base_t;

		typedef typename strategy_t::index_t                    index_t;
		typedef typename strategy_t::item_t                     item_t;
		typedef typename strategy_t::rhs_item_t                 rhs_item_t;

		typedef shared_vector<strategy_t>						shared_vector_t;

		void restore_sec_solution ();

		void mv_minus_mmv (index_t nb, rhs_item_t* sp_block, item_t* sol_block, item_t* sec_sol, rhs_item_t* ss_block, rhs_item_t* sec_rhs);

		sp_linear_solver_base_t solver_;

		BLUE_SKY_TYPE_DECL_T (thermal_jacobian_matrix <strategy_t>);
	};
}


#endif //THERMAL_JACOBIAN_MATRIX_H